package lottery;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.Session;

import dao.HibernateSessionFactory;

/**
 * 时间管理
 * @author liuding,2012-4-20
 *
 * $LastChangedDate$
 * $Author$ 
 */
@Entity
@Table
public class RewardTime
{
    
    public static void main(String[] args)
    {
        RewardTime rt = new RewardTime();
        rt.setBeginTime(6900);
        rt.setBetEndTimeSp(60);
        rt.setBetStartTimeSp(600);
        rt.setEndTime(36000);
        rt.setFirstOpentTime(6900);
        rt.setLotteryId(8);
        rt.setLotteryName("重庆时时彩");
        rt.setOpenTimeSp(600);
        
        Session s = HibernateSessionFactory.getSession();
        s.beginTransaction();
        s.save(rt);
        s.getTransaction().commit();
        s.close();
        
    }
    private int id;
    private int lotteryId;
    private String lotteryName;
    private int betStartTimeSp;   //开奖时间之前多少秒
    private int betEndTimeSp; //时：分：秒换算的总秒数
    private int openTimeSp;  //开奖时间间隔
    private int beginTime;  //时间段开始
    private int endTime; //时间段结束
    private int firstOpentTime; //第一个开奖时间
    
    public int getBeginTime()
    {
        return beginTime;
    }
    public void setBeginTime(int beginTime)
    {
        this.beginTime = beginTime;
    }
    public int getBetEndTimeSp()
    {
        return betEndTimeSp;
    }
    public void setBetEndTimeSp(int betEndTimeSp)
    {
        this.betEndTimeSp = betEndTimeSp;
    }
    public int getBetStartTimeSp()
    {
        return betStartTimeSp;
    }
    public void setBetStartTimeSp(int betStartTimeSp)
    {
        this.betStartTimeSp = betStartTimeSp;
    }
    public int getEndTime()
    {
        return endTime;
    }
    public void setEndTime(int endTime)
    {
        this.endTime = endTime;
    }
    public int getFirstOpentTime()
    {
        return firstOpentTime;
    }
    public void setFirstOpentTime(int firstOpentTime)
    {
        this.firstOpentTime = firstOpentTime;
    }
    @Id
    @GeneratedValue
    public int getId()
    {
        return id;
    }
    public void setId(int id)
    {
        this.id = id;
    }
    public int getLotteryId()
    {
        return lotteryId;
    }
    public void setLotteryId(int lotteryId)
    {
        this.lotteryId = lotteryId;
    }
    public String getLotteryName()
    {
        return lotteryName;
    }
    public void setLotteryName(String lotteryName)
    {
        this.lotteryName = lotteryName;
    }
    public int getOpenTimeSp()
    {
        return openTimeSp;
    }
    public void setOpenTimeSp(int openTimeSp)
    {
        this.openTimeSp = openTimeSp;
    }
    
    
}
